<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
window.onload= function()
{
	var oTxt = document.getElementById('txt1');
	var oBtn = document.getElementById('btn1');
	
	oBtn.onclick=function()
	{
		var oNewwin = window.open('about:blank','_blank');
		oNewwin.document.write(oTxt.value);
	};
};
</script>
</head>

<body>
<textarea name="" id="txt1" cols="30" rows="10"></textarea><br>
<input type="button" value="run" id="btn1">
</body>
</html>
